# -*- coding: utf-8 -*- 
# @project : 《Atcoder》
# @Author : created by bensonrachel on 2021/9/24
# @File : 12.Coin Combinations I.py

# 为什么改成这样，因为cses这平台卡TLE的理由贼难受贼奇怪！！！，用了函数就TLE。

if __name__ == '__main__':
    n, x = map(int, input().split())
    rate = list(map(int, input().split(' ')))
    dp = [1]
    for i in range(1, x + 1):
        best = 0
        for j, coin in enumerate(rate):
            if (i >= coin):
                best = best + dp[i - coin]
        dp.append(best % (10 ** 9 + 7))
    print(dp[x])

# m, n = map(int, input().split(' '))
# coins = list(map(int, input().split(' ')))
# arr = [1]
#
# for i in range(1, n + 1):
#     best = 0
#     for j, c in enumerate(coins):
#         if c <= i:
#             best += arr[i - c]
#     best = best % (10 ** 9 + 7)
#     arr.append(best)
# print(arr[n])
